package com.jichangxiu.server.platform.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.jichangxiu.common.entity.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("platform_login")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Schema(description = "登录日志实体")
public class PlatformLogin extends BaseEntity {

    @Schema(description = "登录日志ID")
    @TableId(value = "login_id", type = IdType.ASSIGN_UUID)
    private String loginId;

    @TableField("login_no")
    @Schema(description = "登录日志编号")
    private String loginNo;

    @TableField("user_name")
    @Schema(description = "用户名")
    private String userName;

    @TableField("user_id")
    @Schema(description = "用户ID")
    private String userId;

    @TableField("tenant_id")
    @Schema(description = "租户ID")
    private String tenantId;

    @TableField("ip")
    @Schema(description = "登录IP")
    private String ip;

    @TableField("location")
    @Schema(description = "登录地点")
    private String location;

    @TableField("browser")
    @Schema(description = "浏览器类型")
    private String browser;

    @TableField("os")
    @Schema(description = "操作系统")
    private String os;

    @TableField("msg")
    @Schema(description = "提示消息")
    private String msg;

    @TableField("remark")
    @Schema(description = "备注")
    private String remark;

    @TableField("status")
    @Schema(description = "状态（false失败 true成功）")
    private Boolean status;

    @TableLogic
    @TableField("deleted")
    @Schema(description = "是否删除（0否 1是）")
    private String deleted;

}
